% spike_list : 2 columns: [time spiking_neuron#] in the range [1 max_int]
% A is an array of neuron numbers
% t0 and t1 are start and end times in ms.
function r=mfr(spike_list,A,t0,t1)


spike_array = sparse(spike_list(:,2),spike_list(:,1),1,max(max(spike_list(:,2)),max(A)),max(t1,max(spike_list(:,1))));
r = (sum(spike_array(A,t0:t1),2)./((t1-t0+1)/1000));

